Skip to content

Add Friendly Name to the Entity Picker + FuzzySeq Algo#7291

Merged
zsarnett merged 7 commits intodevfrom
add-friendly-name-to-picker
Oct 15, 2020
Merged

Add Friendly Name to the Entity Picker + FuzzySeq Algo#7291
zsarnett merged 7 commits intodevfrom
add-friendly-name-to-picker

Conversation

@zsarnett
Copy link
Copy Markdown
Contributor

@zsarnett zsarnett commented Oct 9, 2020

Breaking change

Proposed change

8b68ebf86aa39dab7aa5167d4b77ec94

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

@zsarnett zsarnett changed the title Add Friendly Name to the Entity Picker Add Friendly Name and Fuzzy Matching to the Entity Picker Oct 9, 2020
@zsarnett zsarnett marked this pull request as draft October 10, 2020 21:10
@zsarnett
Copy link
Copy Markdown
Contributor Author

Waiting on a better fuzzy matching from Donka

@zsarnett zsarnett changed the title Add Friendly Name and Fuzzy Matching to the Entity Picker Add Friendly Name to the Entity Picker Oct 13, 2020
@zsarnett zsarnett force-pushed the add-friendly-name-to-picker branch from d439568 to 1548755 Compare October 13, 2020 21:28
@zsarnett zsarnett marked this pull request as ready for review October 13, 2020 21:28
@zsarnett zsarnett changed the title Add Friendly Name to the Entity Picker Add Friendly Name to the Entity Picker + FuzzySeq Algo Oct 13, 2020
@zsarnett zsarnett force-pushed the add-friendly-name-to-picker branch from 38d855b to 1548755 Compare October 13, 2020 22:42
}

private _filterChanged(ev): void {
const filterString = ev.detail.value.toLowerCase();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should fuzzySequentialMatch take care of the lower case?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've gone back and forth on that. I eventually landed that it made more sense for the client to decide whether or not casing should matter.

But that being said, I can't really think of any situations in Home Assistant where you'd want to use case-sensitive filtering.

I'd be fine with moving it into the matcher.

Copy link
Copy Markdown
Member

@bramkragten bramkragten Oct 14, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would make sense to move it to the matcher. We could add a flag eventually to match case if needed... But it would make for less duplicate code and simpler implementation.

@zsarnett zsarnett merged commit 12d73fe into dev Oct 15, 2020
@zsarnett zsarnett deleted the add-friendly-name-to-picker branch October 15, 2020 01:20
@bramkragten bramkragten mentioned this pull request Oct 21, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include Friendly Name in autocomplete for entity picker

4 participants